<template>
  <div class="login">
    <img src="../assets/img/logo.jpg" class="logo" alt="" />
    <input type="text" placeholder="请输入用户名" />
    <input type="password" placeholder="请输入密码" />
    <input type="password" placeholder="请再次输入密码" />
    <button @click="zhuce">注册</button>
    <router-link class="to-reg" :to="{ name: 'Login' }">
      已有账号，我要登录
    </router-link>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},

  methods: {
    // login() {
    //   localStorage.setItem("token", "xxxx");
    //   this.$router.push("/");
    // },
    zhuce() {
      this.$router.push({
        name: 'Login',
      })
    },
  },
  created() {
    // const isLogined = localStorage.getItem("token") || "";
    // if (isLogined) {
    //   this.$router.push("/");
    // }
  },
  mounted() {},
}
</script>
<style scoped>
.login {
  margin-top: 80px;
}
.logo {
  width: 50%;
  max-height: 50%;
  border-radius: 16px;
  display: block;
  margin: 8px auto;
}
input {
  display: block;
  width: 80%;
  padding: 4px 8px;
  margin: 4px auto;
}
.to-reg {
  margin: 8px;
  margin-right: 1rem;
  float: right;
  font-size: 12px;
}
button {
  display: block;
  padding: 8px;
  width: 80%;
  margin: 8px auto;
  border: none;
  background-color: deeppink;
  color: white;
}
</style>
